///////////////////////////////////////
//    Autor: Mato Kormuth              //
//    (C) Mato Programs 2011        //
//////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace MatoPrograms.IO
{
    public class FindingFiles
    {
        public string[] FindFiles(string directory, string extension)
        {
            /*System.IO.DirectoryInfo di = new DirectoryInfo(directory);
            System.IO.DirectoryInfo[] dirs = di.GetDirectories();
            foreach (DirectoryInfo didva in dirs)
            {
                foreach(didva.
            }*/

            string[] filePaths = Directory.GetFiles(directory, "*" + extension,
                                                     SearchOption.AllDirectories);
            return filePaths;
            // returns:
            // "c:\MyDir\my-car.BMP"
            // "c:\MyDir\Friends\james.BMP"

        }
    }
}
